﻿/*
using Adaptive.Agrona;
using Adaptive.Agrona.Concurrent;
using System;
using System.Threading;
using Unity.Kafka.Client.Configuration;
using Unity.Kafka.Client.Offline;

namespace Unity.Kafka.Client.Examples
{
    class Programm
    {
        private static readonly string csiId = "174334";
        private static readonly int timeout = 0;

        private class ConsoleOfflineHandler : IOfflineHandler
        {
            public void onAction(IDirectBuffer buffer, int offset, int length)
            {
                Console.WriteLine($"Run offline handler with args: offset = {offset}, length = {length}");
            }
        }

        static void Main(string[] args)
        {
            IUnityClient client = UnityClientFactory.MakeUnityClient(csiId, new ConsoleOfflineHandler());

            IMutableDirectBuffer buffer = new UnsafeBuffer(new byte[2048]);
            for(int i = 0; i < 5; i++)
            {
               long newOffset = client.Generate(Type.EntityType.ORDER, buffer, 0);
            }
            Thread.Sleep(50000);
            client.Close();
        }
    }
}
*/
